package cn.iocoder.yudao.module.measure.dal.dataobject.warning;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 设备上传数据报警设置
 * </p>
 *
 * @author zhengbzh
 * @date 2025-06-03 15:38:10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@Builder
@TableName("business_device_upload_warning_config")
public class BusinessDeviceUploadWarningConfig {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    protected Long id;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    protected LocalDateTime createdTime;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    protected Long createdBy;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    protected LocalDateTime updatedTime;

    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    protected Long updatedBy;

    /**
     * 租户id
     */
    @TableField(value = "created_org_id", condition = EQUAL)
    private Long createdOrgId;
    /**
     * 告警类型
     */
    @TableField(value = "warning_type", condition = LIKE)
    private String warningType;
    /**
     * 检查类型-越界检查（越上限或越下限），指定事件报警
     */
    @TableField(value = "check_type", condition = LIKE)
    private String checkType;
    /**
     * 告警级别-紧急，重要，一般
     */
    @TableField(value = "warning_level", condition = LIKE)
    private String warningLevel;
    /**
     * 低限界值
     */
    @TableField(value = "limit_low_value", condition = LIKE)
    private String limitLowValue;

    /**
     * 高限界值
     */
    @TableField(value = "limit_high_value", condition = LIKE)
    private String limitHighValue;
    /**
     * 关联协议id
     */
    @TableField(value = "protocol_id", condition = EQUAL)
    private Long protocolId;
    /**
     * 关联数据类型
     */
    @TableField(value = "data_type", condition = LIKE)
    private String dataType;

    /**
     * 参考数据范围
     */
    @TableField(value = "refer_data_scope", condition = EQUAL)
    private String referDataScope;

    /**
     * 关联设备id
     */
    @TableField(value = "device_id", condition = EQUAL)
    private Long deviceId;

    @TableField(value = "device_tree_id", condition = EQUAL)
    private Long deviceTreeId;

}
